package inputData;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;

public class InputData {
	public  static String[] input(File file) throws IOException{
		String[] sb = new String[10];
		try {
			InputStreamReader isr = new InputStreamReader(new FileInputStream(file));
			BufferedReader bf = new BufferedReader(isr);
			String s = null;
			int i = 0;
			while((s = bf.readLine()) != null){
				sb[i++] = s.replaceAll("(\\s)+", " ");
			}
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
//		for(String s:sb){
//			System.out.println(s);
//		}
		return sb;
	}
	public static String[] getInstance() throws IOException{
		String[] tt = InputData.input(new File("test.Properties"));
		
		for(String t:tt){
			System.out.println(t);
		}
		return tt;
	}
}
